import request from '@/utils/request'

// 考勤相关API
const attendance = {
  // 获取今日考勤记录
  getTodayAttendance() {
    return request.get('/api/attendances/today')
  },
  
  // 添加考勤记录
  addAttendance(data) {
    return request.post('/api/attendances', data)
  },

  // 取消今日签到
  cancelToday(id) {
    return request.delete(`/api/attendances/${id}`)
  },
  
  // 获取考勤记录列表
  getList(params) {
    return request.get('/api/attendances/my/time', params)
  }
}

export default attendance 